Task Configuration
In the task configuration, you define one or more tasks to control the flow of programs (POU objects with Program type) and the POUs called from them on your device. A Task Configuration object is required for each application. This is where you define the chronological sequence for calling up the program.
A task is the chronological flow unit for your IEC program. The task defines the call chain of your POUs (call hierarchy).
Each task requires a unique name. In the task configuration editor, specify a list of programs to be called. The programs can be application-specific, in which case the program is located in the Devices view. Or a program can be valid throughout the entire project, in which case the program is located in the POUs view. These POUs are instantiated in the entire project.
It is possible to prioritize a task. Prioritization works in combination with the task type.
You configure a task type:
Cyclic; for a time-controlled flow using a cycle interval. The program calls are run through within the cycle interval (task cycle time).
Freewheeling; for a task without its own task cycle time
Event-triggered (internal or external) by means of a condition for the event start (edge-triggered).
Examples of an event include the rising edge of a global project variable or an interrupt.
Status-triggered via condition
It is possible to couple Start, Stop, and Reset directly with the execution of the project POU.
You can also activate a watchdog.
The call stack is created and executed based on these settings in the task configuration.
Based on the various possible call stacks, it is determined which of these is the longest with the highest memory requirement (maximum call stack). For detailed information about this, see the Stack Usage tab.
Processing order
Rules for the processing order of the configured tasks
When the task condition is fulfilled, the task is started and processed.
If multiple tasks fulfill the condition for processing at the same time, then the tasks with the highest priority are processed first.
If multiple tasks with the same priority level fulfill the condition for processing at the same time, then the task which has been in the queue the longest is processed first.
The program calls are processed in the order they appear in the configuration dialog of the task.
If a program call is not unique because programs with the same name exist in the device tree of the application, in a library, or throughout the project in the POU view, then the program which is below the application object is used.
For more information, see: Bus Cycle Task